package com.nk.mapper;

import com.nk.domain.Permission;
import com.nk.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long rid);

    int insert(Role record);

    Role selectByPrimaryKey(Long rid);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    void insertRoleAndPermissionRel(@Param("role_id") long role_id, @Param("per_id") long per_id);

    List<Permission> getPermissionByRid(long rid);

    void deletePermissionByRole(long role_id);

    List<Long> getRoleIDByEid(Long id);
}